#pragma warning(disable: 4100)

#include "Controller.h"
#include <ObjBase.h>
#include <QtGui/QApplication>
#include <iostream>
using namespace std;

int main( int argc, char* arvg[] )
{
#ifdef WIN32
	WSADATA dat;
	WSAStartup(MAKEWORD(2,2),&dat);

	HRESULT hr = CoInitialize(NULL);
	if (FAILED(hr))
	{
		WSACleanup();
		std::cout << "Couldn't initialize COM" << std::endl;
		return -1;
	}
#endif // WIN32

	QApplication a(argc, arvg);

	Controller controller;
	controller.start("config.xml", "codecs.xml");

	return a.exec();

#ifdef WIN32
	CoUninitialize();	
	WSACleanup();
#endif // WIN32

}